<include file='Public:head' />
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
	<div class="nav">
		<ul class="cc">
		      <li ><a href="{:U('index',array('position_psid'=>$_GET['position_psid'],'verifystate'=>2))}">广告列表</a></li>
		      <li  class="current"><a href="">编辑广告</a></li>
    	</ul>
	</div>
	<div class="h_a">广告属性</div>
	<form action="{:U('Ad/edit')}" method="post" class="J_ajaxForms"  name="myform" id="myform">
		<div class="layui-form">
			<table width="100%"  class="layui-table" >
				<tr>
					<th width="120">广告位置：</th>
					<td class="y-bg">
						<span class="must_red">*</span>
						<div class="layui-input-inline">
						<select name="position_psid"  id='position_psid'>
							<option value="">请选择广告位置</option>
							<foreach name='position' item='v'>
							   	<option value='{$v.psid}' <if condition='$v["psid"] eq $data["position_psid"]'> selected='selected' </if>>{$v.position_name}</option>
							</foreach>
						</select>
						</div>
					</td>
				</tr>
				<tr>
					<th width="120">广告名称：</th>
					<td class="y-bg">
						<span class="must_red">*</span><input type="text" class="layui-input" name="name" id="name" size='50' value="{$data.name}" />
					</td>
				</tr>



				<if condition='C("cfg_language_en")'>
				<tr>
					<th width="120">(英)广告名称：</th>
					<td class="y-bg">
						<input type="text" class="layui-input" name="name_en" id="name_en" size='50' value="{$data.name_en}" />
					</td>
				</tr>
				</if>

				<tr>
					<th width="120">图片：</th>
					<td class="y-bg">


				<div class="pics_box">
                    <div class="pics">
                        <ul class="feng-form-item-photo">
                            <input type="hidden" name="pic" value="{$data.pic}" class="n" />
                            <li class="s">
                                <div class="img">
                                    <img src="__ROOT__/{$data.pic}" /></div>
                                <i class="layui-icon layui-icon-delete feng-photo-delete" title="删除图片">
                                          <a href="__ROOT__/index.php/Admin/Upload/del/id/{$data.id}.html"></a>
                                        </i>
                            </li>
                            <li class="upload-btn pic_upload" data-name="picA" />
                            <i class="layui-icon layui-icon-upload"></i>上传图片
                            </li>
                        </ul>
                    </div>
                </div>

					</td>
				</tr>

				<if condition='C("cfg_language_en")'>
				<tr>
					<th width="120">(英)图片：</th>
					<td class="y-bg">

				<div class="pics_box">
                    <div class="pics">
                        <ul class="feng-form-item-photo">
                            <input type="hidden" name="pic_en" value="{$data.pic_en}" class="n" />
                            <li class="s">
                                <div class="img">
                                    <img src="__ROOT__/{$data.pic_en}" /></div>
                                <i class="layui-icon layui-icon-delete feng-photo-delete" title="删除图片">
                                          <a href="__ROOT__/index.php/Admin/Upload/del/id/{$data.id}.html"></a>
                                        </i>
                            </li>
                            <li class="upload-btn pic_upload" data-name="picA" />
                            <i class="layui-icon layui-icon-upload"></i>上传图片
                            </li>
                        </ul>
                    </div>
                </div>


					</td>
				</tr>
				</if>
				<tr>
					<th width="120">广告链接：</th>
					<td class="y-bg">
						<textarea name='url' id='url' style="width:90%;height:80px" class="layui-textarea">{$data.url}</textarea>
					</td>
				</tr>

				<tr>
					<th width="120">广告说明：</th>
					<td class="y-bg">
						<textarea name='info' id='info' style="width:90%;height:80px" class="layui-textarea">{$data.info}</textarea>
					</td>
				</tr>
				
				<if condition='C("cfg_language_en")'>
				<tr>
					<th width="120">(英)广告说明：</th>
					<td class="y-bg">
						<textarea name='info_en' id='info_en' style="width:90%;height:80px" class="layui-textarea">{$data.info_en}</textarea>
					</td>
				</tr>
				</if>

				<tr>
					<th width="120">排序：</th>
					<td class="y-bg">
						<input type="text" class="layui-input" name="sort" id="sort" value="{$data.sort}" />
					</td>
				</tr>
				<tr>
					<th width="120">状态：</th>
					<td class="y-bg">
						<input type="radio" name="verifystate" title='未审核' value="1" <if condition='$data["verifystate"] eq 1'>checked='checked'</if>> 
			
						<input type="radio" name="verifystate" title='审核通过' value="2" <if condition='$data["verifystate"] eq 2'>checked='checked'</if>>
					</td>
				</tr>

				
				
			</table>
		</div>
		<div class="">
			<div class="btn_wrap_pd">
				<input type="hidden" name='aid' value="{$data.aid}" />
				<button class="layui-btn J_ajax_submit_btn" type="submit">编辑</button>

			</div>
		</div>
	</form>
</div>


<script src="__ROOT__/lib/layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mod.common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mod.content_addtop.js"></script>
<script type="text/javascript" src='__PUBLIC__/js/mod.ad.js'></script>

<script type="text/html" id="J_PhotoTpl">
    <li>
        <div class="img"><img src="__ROOT__/{{ d.file }}" /></div>
        <input type="hidden" name="{{ d.name }}" value="{{ d.file }}" />        
        <i class="layui-icon layui-icon-delete feng-photo-delete" title="删除图片" data-path="{{ d.file }}">
          <a href="__ROOT__/index.php/Admin/Upload/del/id/{{ d.id }}.html"></a>
        </i>
    </li>
</script>


</body>
</html>